buildscript {
    ext.ktor_version = '1.2.3'
    ext.logback_version='1.2.1'

}
plugins {
    id 'java'
    id 'org.jetbrains.kotlin.jvm' version '1.3.21'
}



group 'com.dalthed'
version '0.3'

sourceCompatibility = 1.8

repositories {
    mavenCentral()
    jcenter()
}

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
    testCompile group: 'junit', name: 'junit', version: '4.12'
    compile "com.squareup.okhttp3:okhttp:4.2.0"
    implementation 'com.google.code.gson:gson:2.8.5'
    implementation 'com.squareup.retrofit2:retrofit:2.6.1'
    compile 'com.squareup.retrofit2:converter-gson:2.6.1'
    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.0'

    compile group: 'commons-net', name: 'commons-net', version: '3.6'

    compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.9'


    compile "io.ktor:ktor-server-core:$ktor_version"
    compile "io.ktor:ktor-server-netty:$ktor_version"
    compile "io.ktor:ktor-freemarker:$ktor_version"
    compile "ch.qos.logback:logback-classic:$logback_version"
    compile 'com.eeeeeric:mpc-hc-api:0.1.0'
    compile group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-xml', version: '2.10.0'
    compile 'com.fasterxml.jackson.module:jackson-module-kotlin:2.10.0.pr3'
    compile 'com.squareup.retrofit2:converter-jackson:2.6.2'


}

compileKotlin {
    kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
    kotlinOptions.jvmTarget = "1.8"
}

task fatJar(type: Jar) {
    manifest {
        attributes 'Implementation-Title': 'Xtream-VLC-Client',
                'Implementation-Version': version,
                'Main-Class': 'xtreamclient.MainKt'
    }
    baseName = project.name + '-all'
    from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
    with jar
}